home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 6
/
FM Towns Free Software Collection 6.iso
/
t_os
/
algernon
/
vil_uty.bas
< prev
next >
Wrap
BASIC Source File
|
1993-07-08
|
16KB
|
462 lines
50030 *VIL_UTY_VER
50035 VIL_VER=100
50040 RETURN
50070 *VIL_SYSCNF_INITM
50120 VIL_VWX(10)=VIL_W0 :VIL_VWY(10)=VIL_W1
50125 VIL_VWW(10)=VIL_W0+111:VIL_VWZ(10)=VIL_W1+79
50135 RETURN
50145 *VIL_SYSCNF
50185 VIL_VWN=10:VIL_VWAT=15:VIL_VWT$="SYSTEM"
50190 GOSUB *VIL_VWOPEN
50195 SYMBOL(8, 8),"システム設定",1,1,6
50200 SYMBOL(8,36),"1 BGM設定",1,1,7
50205 SYMBOL(8,56),"2 色設定 ",1,1,7
50215 VIL_BCE=0:VIL_VWMR=0:VIL_KN=-1
50220 WHILE VIL_VWMR<>2
50225 VIL_X=4:VIL_Y=34:VIL_W=VIL_X+103:VIL_Z=VIL_Y+19
50230 VIL_YL=20:VIL_XN=1:VIL_YN=2:VIL_BXDIR=0:VIL_C=15:VIL_MN=10
50235 GOSUB *VIL_MSEL
50240 IF VIL_KN<0 THEN
50245 GOSUB *VIL_VWMCHECK
50250 ELSE IF VIL_KN=0 THEN
50255 GOSUB *VIL_VWCLOSE:VIL_VWMR=2
50260 ELSE
50265 GOSUB *VIL_GBEEP
50270 ON VIL_KN GOSUB *VIL_BGM,*VIL_COLCNF
50275 VIL_VWMR=0
50280 ENDIF
50285 WEND
50290 RETURN
50320 *VIL_COLCNF_INITM
50390 VIL_INT=VIL_W4
50395 VIL_INTINIT=VIL_W4
50400 DIM VIL_P(2)
50405 DIM VIL_VWP(2)
50410 DIM VIL_VWPINIT(2)
50415 VIL_VWP(0)=VIL_W5:VIL_VWPINIT(0)=VIL_W5
50420 VIL_VWP(1)=VIL_W6:VIL_VWPINIT(1)=VIL_W6
50425 VIL_VWP(2)=VIL_W7:VIL_VWPINIT(2)=VIL_W7
50435 GOSUB *VIL_COLCNF_INIT
50445 VIL_VWX(20)=VIL_W0 :VIL_VWY(20)=VIL_W1
50450 VIL_VWW(20)=VIL_W0+159:VIL_VWZ(20)=VIL_W1+99
50455 VIL_VWX(21)=VIL_W2 :VIL_VWY(21)=VIL_W3
50460 VIL_VWW(21)=VIL_W2+159:VIL_VWZ(21)=VIL_W3+99
50465 RETURN
50475 *VIL_COLCNF_INIT
50515 VIL_INT=VIL_INTINIT
50520 IF VIL_INT THEN VIL_K=255 ELSE VIL_K=192
50525 GOSUB *VIL_INTSET
50530 VIL_VWP(0)=VIL_VWPINIT(0)
50535 VIL_VWP(1)=VIL_VWPINIT(1)
50540 VIL_VWP(2)=VIL_VWPINIT(2)
50545 GOSUB *VIL_WPALSET
50550 RETURN
50560 *VIL_WPALSET
50600 PALETTE 1,[VIL_VWP(0)-80+(VIL_VWP(0)<80)*(VIL_VWP(0)-80) ,VIL_VWP(1)-80+(VIL_VWP(1)<80)*(VIL_VWP(1)-80) ,VIL_VWP(2)-80+(VIL_VWP(2)<80)*(VIL_VWP(2)-80)],1
50605 PALETTE 2,[VIL_VWP(0),VIL_VWP(1),VIL_VWP(2)],1
50610 PALETTE 3,[VIL_VWP(0)+80+(VIL_VWP(0)>175)*(VIL_VWP(0)-175) ,VIL_VWP(1)+80+(VIL_VWP(1)>175)*(VIL_VWP(1)-175) ,VIL_VWP(2)+80+(VIL_VWP(2)>175)*(VIL_VWP(2)-175)],1
50615 RETURN
50625 *VIL_COLCNF
50715 VIL_VWN=20:VIL_VWAT=15:VIL_VWT$="COLOR"
50720 GOSUB *VIL_VWOPEN
50725 SYMBOL(8, 8)," 色設定 ",1,1,6
50730 SYMBOL(8,36),"1 表示 ["+KMID$("低高",1-VIL_INT,1)+"輝度]",1,1,7
50735 SYMBOL(8,56),"2 パレット初期化",1,1,7
50740 SYMBOL(8,76),"3 ウィンドウ色設定",1,1,7
50750 VIL_BCE=0:VIL_VWMR=0:VIL_KN=-1
50755 WHILE VIL_VWMR<>2
50760 VIL_X=4:VIL_Y=34:VIL_W=VIL_X+151:VIL_Z=VIL_Y+19
50765 VIL_YL=20:VIL_XN=1:VIL_YN=3:VIL_BXDIR=0:VIL_C=15:VIL_MN=20
50770 GOSUB *VIL_MSEL
50775 IF VIL_KN<0 THEN
50780 GOSUB *VIL_VWMCHECK
50785 ELSE IF VIL_KN=0 THEN
50790 GOSUB *VIL_VWCLOSE:VIL_VWMR=2
50795 ELSE
50800 GOSUB *VIL_GBEEP
50805 ON VIL_KN GOSUB 50855,*VIL_COLCNF_INIT,50885
50810 VIL_X=88:VIL_Y=36:VIL_L=2:VIL_C=15:VIL_CB=VIL_VWCB
50815 VIL_A$=KMID$("低高",1-VIL_INT,1)
50820 GOSUB *VIL_GPRINT
50825 VIL_VWMR=0
50830 ENDIF
50835 WEND
50840 RETURN
50855 VIL_INT=NOT VIL_INT
50860 IF VIL_INT THEN VIL_K=255 ELSE VIL_K=192
50865 GOSUB *VIL_INTSET
50870 RETURN
50885 VIL_P(0)=VIL_VWP(0):VIL_P(1)=VIL_VWP(1):VIL_P(2)=VIL_VWP(2):VIL_P=2
50890 GOSUB *VIL_PALCNF
50895 VIL_VWP(0)=VIL_P(0):VIL_VWP(1)=VIL_P(1):VIL_VWP(2)=VIL_P(2)
50900 GOSUB *VIL_WPALSET
50905 RETURN
50915 *VIL_INTSET
50955 PALETTE 9,[ 0, 0,VIL_K],1
50960 PALETTE 10,[ 0,VIL_K, 0],1
50965 PALETTE 11,[ 0,VIL_K,VIL_K],1
50970 PALETTE 12,[VIL_K, 0, 0],1
50975 PALETTE 13,[VIL_K, 0,VIL_K],1
50980 PALETTE 14,[VIL_K,VIL_K, 0],1
50985 PALETTE 15,[VIL_K,VIL_K,VIL_K],1
50990 RETURN
51000 *VIL_PALCNF
51065 VIL_VWN=21:VIL_VWAT=15:VIL_VWT$="PALETTE"
51070 GOSUB *VIL_VWOPEN
51075 SYMBOL(32,8),"パレット設定",1,1,6
51080 LINE( 8,8)-( 23,24),PSET,%VIL_P,BF
51085 LINE(136,8)-(151,24),PSET,%VIL_P,BF
51095 GOSUB 51330
51100 FOR VIL_I=2 TO 0 STEP -1
51105 SYMBOL( 8,VIL_I*20+36),MID$("GRB",3-VIL_I,1),1,1,4-VIL_I+(VIL_I>0)
51110 SYMBOL(16,VIL_I*20+36),"( )",1,1,7
51115 FOR VIL_J=1 TO 3
51120 LINE(VIL_BXX(VIL_I*3+VIL_J)+2,VIL_BXY(VIL_I*3+VIL_J)+2) -(VIL_BXW(VIL_I*3+VIL_J)-2,VIL_BXZ(VIL_I*3+VIL_J)-2),PSET,7,B
51125 NEXT
51130 SYMBOL( 48,VIL_I*20+36),"〈",1,1,7
51135 SYMBOL(141,VIL_I*20+36),"〉",1,1,7
51140 GOSUB 51280
51145 NEXT
51155 VIL_BCE=0:VIL_VWMR=0:VIL_KN=-1
51160 WHILE VIL_VWMR<>2
51165 VIL_XN=3:VIL_YN=3:VIL_BXDIR=4:VIL_C=15:VIL_MN=21
51170 GOSUB *VIL_MSELIN
51175 IF VIL_KN<0 THEN
51180 GOSUB *VIL_VWMCHECK
51185 GOSUB 51330
51190 ELSE IF VIL_KN=0 THEN
51195 GOSUB *VIL_VWCLOSE:VIL_VWMR=2
51200 ELSE
51205 VIL_I=2-(VIL_KN-1)\3
51210 VIL_J=VIL_KN MOD 3
51215 IF VIL_J=2 THEN
51225 ELSE
51230 VIL_P(VIL_I)=VIL_P(VIL_I)+((VIL_J=1)-(VIL_J=0))*16
51235 VIL_P(VIL_I)=VIL_P(VIL_I) +((255<VIL_P(VIL_I))-(VIL_P(VIL_I)<0))*256
51240 ENDIF
51245 GOSUB 51280
51250 PALETTE VIL_P,[VIL_P(0),VIL_P(1),VIL_P(2)],1
51255 ENDIF
51260 WEND
51265 RETURN
51280 VIL_X=24:VIL_Y=VIL_I*20+36
51285 VIL_A$=FNVIL_P2SS$(VIL_P(VIL_I)\16,2):VIL_L=2:VIL_C=15:VIL_CB=VIL_VWCB
51290 GOSUB *VIL_GPRINT
51295 LINE(72,VIL_I*20+37)-(131,VIL_I*20+50),PSET,%VIL_VWCB,BF
51300 IF VIL_P(VIL_I)\16 THEN
51305 LINE(72,VIL_I*20+37)-(71+(VIL_P(VIL_I)\16)*4,VIL_I*20+50),PSET ,4-VIL_I+(VIL_I>0),BF
51310 ENDIF
51315 RETURN
51330 FOR VIL_I=0 TO 2
51335 VIL_BXX(VIL_I*3+1)= 50:VIL_BXY(VIL_I*3+1)=74-VIL_I*20
51340 VIL_BXW(VIL_I*3+1)= 69:VIL_BXZ(VIL_I*3+1)=93-VIL_I*20
51345 VIL_BXX(VIL_I*3+2)= 69:VIL_BXY(VIL_I*3+2)=74-VIL_I*20
51350 VIL_BXW(VIL_I*3+2)=134:VIL_BXZ(VIL_I*3+2)=93-VIL_I*20
51355 VIL_BXX(VIL_I*3+3)=134:VIL_BXY(VIL_I*3+3)=74-VIL_I*20
51360 VIL_BXW(VIL_I*3+3)=153:VIL_BXZ(VIL_I*3+3)=93-VIL_I*20
51365 NEXT
51370 RETURN
51405 *VIL_BGM_INITM
51450 VIL_VWX(30)=VIL_W0 :VIL_VWY(30)=VIL_W1
51455 VIL_VWW(30)=VIL_W0+96:VIL_VWZ(30)=VIL_W1+79
51465 RETURN
51475 *VIL_BGM
51555 VIL_VWN=30:VIL_VWAT=15:VIL_VWT$="BGM"
51560 GOSUB *VIL_VWOPEN
51565 SYMBOL(8, 8),"BGM設定",1,1,6
51570 SYMBOL(8,36),"1 FM音源",1,1,7
51575 SYMBOL(8,56),"2 CDDA",1,1,7
51585 VIL_BCE=0:VIL_VWMR=0:VIL_KN=-1
51590 WHILE VIL_VWMR<>2
51595 VIL_X=4:VIL_Y=34:VIL_W=VIL_X+87:VIL_Z=VIL_Y+19
51600 VIL_YL=20:VIL_XN=1:VIL_YN=2:VIL_BXDIR=0:VIL_C=15:VIL_MN=30
51605 GOSUB *VIL_MSEL
51610 IF VIL_KN<0 THEN
51615 GOSUB *VIL_VWMCHECK
51620 ELSE IF VIL_KN=0 THEN
51625 GOSUB *VIL_VWCLOSE:VIL_VWMR=2
51630 ELSE
51635 GOSUB *VIL_GBEEP
51640 ON VIL_KN GOSUB *VIL_BGMFM,*VIL_BGMCD
51645 VIL_VWMR=0
51650 ENDIF
51655 WEND
51660 RETURN
51690 *VIL_BGMFM_INITM
51750 DIM VIL_FM0$(VIL_W4),VIL_FM1$(VIL_W4)
51755 DIM VIL_FM2$(VIL_W4),VIL_FM3$(VIL_W4)
51760 DIM VIL_FM4$(VIL_W4),VIL_FM5$(VIL_W4)
51765 DIM VIL_FMT$(VIL_W5)
51770 DIM VIL_FMN$(VIL_W5)
51780 VIL_FMF=0
51785 VIL_FMSP=0
51790 VIL_FMLS=-1
51795 VIL_FMLB=0:VIL_FMLE=0:VIL_FMME=0
51800 VIL_FMTMAX=0
51805 VIL_VWX(31)=VIL_W0 :VIL_VWY(31)=VIL_W1
51810 VIL_VWW(31)=VIL_W0+175:VIL_VWZ(31)=VIL_W1+ 79
51815 VIL_VWX(32)=VIL_W2 :VIL_VWY(32)=VIL_W3
51820 VIL_VWW(32)=VIL_W2+287:VIL_VWZ(32)=VIL_W3+223
51830 GOSUB *VIL_FMTREAD
51835 RETURN
51845 *VIL_BGMFM
51930 VIL_VWN=31:VIL_VWAT=15:VIL_VWT$="BGM FM"
51935 GOSUB *VIL_VWOPEN
51940 IF VIL_CDF THEN GOSUB *VIL_CDOFF
51945 SYMBOL(8,8)," FM音源BGM ",1,1,6
51950 SYMBOL(8,36),"1 BGM ["+KMID$("OFFON ",1-VIL_FMF*3,3)+"]" ,1,1,7
51955 SYMBOL(8,56),"2 曲選択",1,1,7
51965 VIL_BCE=0:VIL_VWMR=0:VIL_KN=-1
51970 WHILE VIL_VWMR<>2
51975 VIL_X=4:VIL_Y=34:VIL_W=VIL_X+167:VIL_Z=VIL_Y+19
51980 VIL_YL=20:VIL_XN=1:VIL_YN=2:VIL_BXDIR=0:VIL_C=15:VIL_MN=31
51985 GOSUB *VIL_MSEL
51990 IF VIL_KN<0 THEN
51995 GOSUB *VIL_VWMCHECK
52000 ELSE IF VIL_KN=0 THEN
52005 GOSUB *VIL_VWCLOSE:VIL_VWMR=2
52010 ELSE
52015 GOSUB *VIL_GBEEP
52020 ON VIL_KN GOSUB 52070,*VIL_FMSEL
52025 VIL_X=104:VIL_Y=36:VIL_L=6:VIL_C=15:VIL_CB=VIL_VWCB
52030 VIL_A$=KMID$("OFFON ",1-VIL_FMF*3,3)
52035 GOSUB *VIL_GPRINT
52040 VIL_VWMR=0
52045 ENDIF
52050 WEND
52055 RETURN
52070 IF VIL_FMF THEN
52075 GOSUB *VIL_FMOFF
52080 ELSE
52085 IF VIL_FMINIT$="" THEN
52090 GOSUB *VIL_BBEEP
52100 ELSE
52105 GOSUB *VIL_FMON
52110 ENDIF
52115 ENDIF
52120 RETURN
52130 *VIL_FMSEL
52220 VIL_VWN=32:VIL_VWAT=15:VIL_VWT$="BGM SELECT"
52225 GOSUB *VIL_VWOPEN
52230 SYMBOL(8,8)," FM音源BGM 曲選択",1,1,6
52240 GOSUB 52380
52250 VIL_BCE=0:VIL_VWMR=0:VIL_KN=-1
52255 WHILE VIL_VWMR<>2
52260 VIL_X=4:VIL_Y=34:VIL_W=VIL_X+279:VIL_Z=VIL_Y+19
52265 VIL_YL=20:VIL_XN=1:VIL_YN=9:VIL_BXDIR=0:VIL_C=15:VIL_MN=32
52270 GOSUB *VIL_MSEL
52275 IF VIL_KN<0 THEN
52280 GOSUB *VIL_VWMCHECK
52285 ELSE IF VIL_KN=0 THEN
52290 GOSUB *VIL_VWCLOSE:VIL_VWMR=2
52295 ELSE
52300 IF VIL_KN=9 THEN
52305 VIL_FMSP=VIL_FMSP+8:IF VIL_FMSP>VIL_FMTMAX THEN VIL_FMSP=0
52310 GOSUB 52380
52315 ELSE IF VIL_FMSP+VIL_KN-2<VIL_FMTMAX THEN
52320 VIL_W0=INSTR(VIL_FMN$(VIL_FMSP+VIL_KN-1),"/")
52325 VIL_F$=LEFT$(VIL_FMN$(VIL_FMSP+VIL_KN-1),VIL_W0-1)
52330 VIL_A$= MID$(VIL_FMN$(VIL_FMSP+VIL_KN-1),VIL_W0+1)
52340 GOSUB *VIL_FMDREAD
52345 ENDIF
52350 VIL_VWMR=0
52355 ENDIF
52360 WEND
52365 RETURN
52380 VIL_L=34:VIL_C=15:VIL_CB=VIL_VWCB
52385 FOR VIL_I=0 TO 7
52390 VIL_X=8:VIL_Y=VIL_I*20+36
52395 VIL_A$=HEX$(VIL_I+1)
52400 IF VIL_FMSP+VIL_I<=VIL_FMTMAX THEN VIL_A$=VIL_A$+" "+VIL_FMT$(VIL_FMSP+VIL_I)
52405 GOSUB *VIL_GPRINT
52410 NEXT
52415 SYMBOL(8,196),"9 ~ 次頁 ~",1,1,7
52420 RETURN
52430 *VIL_FMTREAD
52470 VIL_E=0
52475 OPEN "I",#1,VIL_FMTDIR$+"FM_TITLE.VIL"
52480 IF VIL_E=0 THEN
52485 INPUT #1,VIL_FMTMAX:VIL_FMTMAX=VIL_FMTMAX-1
52490 FOR VIL_I=0 TO VIL_FMTMAX
52495 LINE INPUT #1,VIL_FMT$(VIL_I)
52500 LINE INPUT #1,VIL_FMN$(VIL_I)
52505 NEXT
52510 CLOSE #1
52515 ENDIF
52520 RETURN
52530 *VIL_FMDREAD
52630 VIL_W0=VIL_FMF
52635 IF VIL_W0 THEN GOSUB *VIL_FMOFF
52640 VIL_A$=":"+VIL_A$
52645 IF LEFT$(VIL_F$,1)<>"\" AND MID$(VIL_F$,2,1)<>":" THEN
52650 VIL_F$=VIL_FMTDIR$+VIL_F$
52655 ENDIF
52660 OPEN "I",#1,VIL_F$
52665 GOSUB 52795:IF VIL_W0$<>VIL_A$ THEN 52665
52670 GOSUB 52795
52675 IF VIL_W0$="*" THEN
52680 LOAD@
52685 ELSE
52690 IF LEFT$(VIL_W0$,1)<>"\" AND MID$(VIL_W0$,2,1)<>":" THEN
52695 VIL_W0$=VIL_FMTDIR$+VIL_W0$
52700 ENDIF
52705 LOAD@ VIL_W0$
52710 ENDIF
52715 GOSUB 52795:VIL_FMLB=VAL(VIL_W0$)
52720 GOSUB 52795:VIL_FMLE=VAL(VIL_W0$)
52725 GOSUB 52795:VIL_FMME=VAL(VIL_W0$)
52730 GOSUB 52795:VIL_FMINIT$=VIL_W0$
52740 FOR VIL_I=0 TO VIL_FMME:GOSUB 52795:VIL_FM0$(VIL_I)=VIL_W0$:NEXT
52745 FOR VIL_I=0 TO VIL_FMME:GOSUB 52795:VIL_FM1$(VIL_I)=VIL_W0$:NEXT
52750 FOR VIL_I=0 TO VIL_FMME:GOSUB 52795:VIL_FM2$(VIL_I)=VIL_W0$:NEXT
52755 FOR VIL_I=0 TO VIL_FMME:GOSUB 52795:VIL_FM3$(VIL_I)=VIL_W0$:NEXT
52760 FOR VIL_I=0 TO VIL_FMME:GOSUB 52795:VIL_FM4$(VIL_I)=VIL_W0$:NEXT
52765 FOR VIL_I=0 TO VIL_FMME:GOSUB 52795:VIL_FM5$(VIL_I)=VIL_W0$:NEXT
52770 CLOSE #1
52775 IF VIL_W0 THEN GOSUB *VIL_FMON
52780 RETURN
52795 LINE INPUT #1,VIL_W0$:IF LEFT$(VIL_W0$,1)="'" THEN 52795
52800 RETURN
52810 *VIL_FMON
52850 VIL_FMF=-1:VIL_FMP=0:VIL_FMT=0
52855 PLAY VIL_FMINIT$
52860 GOSUB *VIL_FMDRV
52865 ON INTERVAL GOSUB *VIL_FMDRV:INTERVAL 1:INTERVAL ON
52870 RETURN
52880 *VIL_FMOFF
52920 VIL_FMF=0:INTERVAL OFF:PLAY OFF
52925 RETURN
52935 *VIL_FMDRV
52975 IF PLAY(1)>=VIL_FMP-1 THEN
52980 VIL_FMP=VIL_FMP+.125!
52985 PLAY VIL_FM0$(VIL_FMT),VIL_FM1$(VIL_FMT),VIL_FM2$(VIL_FMT), VIL_FM3$(VIL_FMT),VIL_FM4$(VIL_FMT),VIL_FM5$(VIL_FMT)
52990 VIL_FMT=VIL_FMT+1
52995 IF VIL_FMT>VIL_FMLE AND VIL_FMLS THEN VIL_FMT=VIL_FMLB
53000 IF VIL_FMT>VIL_FMME THEN INTERVAL OFF:VIL_FMF=0
53005 ENDIF
53010 RETURN
53155 *VIL_BGMCD_INITM
53200 DIM VIL_CDI%(5),VIL_CDS%(8)
53205 VIL_CDF=0
53210 VIL_CDTS=0
53215 VIL_CDMS=0
53220 VIL_CDPN=1
53225 VIL_VWX(33)=VIL_W0 :VIL_VWY(33)=VIL_W1
53230 VIL_VWW(33)=VIL_W0+243:VIL_VWZ(33)=VIL_W1+115
53240 RETURN
53250 *VIL_BGMCD
53340 VIL_VWN=33:VIL_VWAT=15:VIL_VWT$="BGM CD"
53345 GOSUB *VIL_VWOPEN
53350 IF VIL_FMF THEN GOSUB *VIL_FMOFF
53355 LINE(0,0)-(243,115),PSET,%2,BF
53360 SYMBOL(57,4),"CDDA BGM-PLAYER",1,1,4,,,3
53365 FOR VIL_I=26 TO 72 STEP 46
53370 FOR VIL_J=52 TO 152 STEP 50
53375 LINE(VIL_J,VIL_I)-(VIL_J+39,VIL_I+37),PSET,%VIL_VWCB,BF
53380 NEXT
53385 NEXT
53395 LINE( 6,72)-( 41,109),PSET,%VIL_VWCB,BF
53400 LINE(202,72)-(237,109),PSET,%VIL_VWCB,BF
53410 VIL_E=0
53415 CDINF VIL_CDI%
53420 IF VIL_E THEN
53425 VIL_WX=VIL_WX+2:VIL_WY=VIL_WY+64
53430 VIL_WW=VIL_WX+239:VIL_WZ=VIL_WY+31
53435 VIL_VWAT=0:VIL_VWT$="ERROR":VIL_VWN=0
53440 GOSUB *VIL_VWOPEN
53445 SYMBOL(8,8),"CDがセットされていません。",1,1,7
53450 GOSUB *VIL_MVWAIT
53455 GOSUB *VIL_VWCLOSE:GOSUB *VIL_VWCLOSE
53460 ELSE
53465 IF VIL_CDI%(1)=3 THEN VIL_CDI%(1)=2
53470 IF VIL_CDPN<VIL_CDI%(1) THEN VIL_CDPN=VIL_CDI%(1)
53475 IF VIL_CDI%(5)<VIL_CDPN THEN VIL_CDPN=VIL_CDI%(1)
53485 SYMBOL( 56,28),"MODE",1,1,7
53490 SYMBOL(110,28),"BGM",1,1,7
53495 SYMBOL(156,28),"TEST",1,1,7
53500 SYMBOL( 57,76),"<",2,2,7
53505 SYMBOL(157,76),">",2,2,7
53510 SYMBOL( 8,76),FNVIL_P2S0$(VIL_CDI%(1),2),2,2,7
53515 SYMBOL(204,76),FNVIL_P2S0$(VIL_CDI%(5),2),2,2,7
53520 SYMBOL(106,76),FNVIL_P2S0$(VIL_CDPN,2),2,2,7
53525 GOSUB 53855
53530 GOSUB 53835
53540 VIL_BCE=0:VIL_VWMR=0:VIL_KN=-1
53545 WHILE VIL_VWMR<>2
53550 VIL_X=50:VIL_Y=24+46:VIL_W=VIL_X+43:VIL_Z=VIL_Y+41
53555 VIL_XL=50:VIL_YL=46:VIL_XN=3:VIL_YN=2:VIL_BXDIR=4:VIL_C=15
53560 VIL_MN=33
53565 GOSUB *VIL_MSEL
53570 IF VIL_KN<0 THEN
53575 GOSUB *VIL_VWMCHECK
53580 ELSE IF VIL_KN=0 THEN
53585 GOSUB *VIL_VWCLOSE:VIL_VWMR=2
53590 ELSE
53595 ON VIL_KN GOSUB 53725,53740,53815,53635,53655,53705
53600 VIL_VWMR=0
53605 ENDIF
53610 WEND
53615 ENDIF
53620 RETURN
53635 VIL_CDMS=NOT VIL_CDMS
53640 GOSUB 53855
53645 RETURN
53655 VIL_CDF=NOT VIL_CDF
53660 IF VIL_CDF THEN
53665 INTERVAL 1:ON INTERVAL GOSUB *VIL_CDDRV:INTERVAL ON
53670 GOSUB *VIL_CDDRV
53675 ELSE
53680 INTERVAL OFF:CD STOP
53685 ENDIF
53690 GOSUB 53855
53695 RETURN
53705 VIL_CDTS=NOT VIL_CDTS
53710 GOSUB 53855
53715 RETURN
53725 VIL_CDPN=VIL_CDPN-1:IF VIL_CDPN<VIL_CDI%(1) THEN VIL_CDPN=VIL_CDI%(5)
53730 GOSUB 53830:RETURN
53740 VIL_WX=VIL_WX+64:VIL_WY=VIL_WY+32:VIL_WW=VIL_WX+111:VIL_WZ=VIL_WY+51
53745 VIL_VWAT=0:VIL_VWT$="INPUT":VIL_VWN=0
53750 GOSUB *VIL_VWOPEN
53755 SYMBOL(8,8),"トラック番号",1,1,6
53760 VIL_X=32:VIL_Y=28:VIL_L=2:VIL_C=15:VIL_CB=VIL_VWBC:VIL_A$=""
53765 GOSUB *VIL_INPSTR
53770 IF VIL_A$>"" THEN
53775 IF VAL(VIL_A$)<VIL_CDI%(1) OR VIL_CDI%(5)<VAL(VIL_A$) THEN
53780 GOSUB *VIL_BBEEP:GOTO 53765
53785 ENDIF
53790 ENDIF
53795 GOSUB *VIL_VWCLOSE
53800 IF VIL_A$>"" THEN VIL_CDPN=VAL(VIL_A$):GOSUB 53830
53805 RETURN
53815 VIL_CDPN=VIL_CDPN+1:IF VIL_CDPN>VIL_CDI%(5) THEN VIL_CDPN=VIL_CDI%(1)
53820 GOSUB 53830:RETURN
53830 IF VIL_CDTS=-1 THEN CD PLAY VIL_CDPN
53835 LINE(102,72)-(141,109),PSET,%VIL_VWCB,BF
53840 SYMBOL(106,76),FNVIL_P2S0$(VIL_CDPN,2),2,2,7
53845 RETURN
53855 LINE(60,46)-(83,61),PSET,%VIL_VWCB,BF
53860 SYMBOL(60,46),MID$("ONEALL",1-VIL_CDMS*3,3),1,1,7
53865 LINE(110,46)-(133,61),PSET,%VIL_VWCB,BF
53870 SYMBOL(110,46),MID$("OFFON",1-VIL_CDF*3,3),1,1,7
53875 LINE(162,46)-(185,61),PSET,%VIL_VWCB,BF
53880 SYMBOL(162,46),MID$("OFFON",1-VIL_CDTS*3,3),1,1,7
53885 RETURN
53895 *VIL_CDON
53935 VIL_CDF=-1
53940 GOSUB *VIL_CDDRV
53945 INTERVAL 1:ON INTERVAL GOSUB *VIL_CDDRV:INTERVAL ON
53950 RETURN
53960 *VIL_CDOFF
53995 VIL_CDF=0:INTERVAL OFF:CD STOP
54000 RETURN
54010 *VIL_CDDRV
54060 VIL_E=0
54065 CDSTAT VIL_CDS%
54070 IF VIL_E THEN
54075 VIL_CDF=0:INTERVAL OFF
54080 ELSE IF VIL_CDS%(1)=0 THEN
54085 IF VIL_CDMS THEN CD PLAY ELSE CD PLAY VIL_CDPN
54090 ENDIF
54095 RETURN